/**
 * @file vafa.h
 * @brief 与VOFA上位机进行数据通信相关的协议代码及相关功能函数
 * 
 * @author dalin (dalin@open-robot.com)
 * @version 1.0
 * @date 2023-05-18
 * 
 * @copyright Copyright (c) 2023  Open Robot Tech.co, Ltd
 * 
 * @par 修改日志:
 * <table>
 * <tr><th>Date       <th>Version <th>Author  <th>Description
 * <tr><td>2023-05-18 <td>1.0     <td>yangsl     <td>Init
 * </table>
 */


#ifndef __VOFA_H
#define __VOFA_H

#include <string.h>
#include "stdint.h"
#include "drv_usart.h"

#define ENABLE_VOFA 1

/* vofa上位机串口号 */
#if   (VOFA_PORT == 0x01)
#define DEV_VOFA 		DRV_UART1
#elif (VOFA_PORT == 0x02)
#define DEV_VOFA 		DRV_UART2
#elif (VOFA_PORT == 0x03)
#define DEV_VOFA 		DRV_UART3
#elif (VOFA_PORT == 0x04)
#define DEV_VOFA 		DRV_UART4
#elif (VOFA_PORT == 0x05)
#define DEV_VOFA 		DRV_UART5
#elif (VOFA_PORT == 0x06)
#define DEV_VOFA 		DRV_UART6
#endif

#define CH_COUNT    30

typedef struct  {
    float fdata[CH_COUNT];
    unsigned char tail[4] ;
}justFloat_t;

void vofa_upload(void * data, uint8_t len);

extern justFloat_t vofa_frame;

#endif /* __VOFA_H */

